<template>
  <page-header-wrapper :title="false">
    <a-card>
      <template slot="extra">
        <a-button icon="plus" size="small" type="primary" @click="addTrademark">添加商标</a-button>
        <a-button icon="export" size="small" type="danger" style="margin-left:5px">导入商标</a-button>
      </template>
      <a-tabs type="card" v-model="tab" @change="onTabs">
        <a-tab-pane key="1" tab="未检"></a-tab-pane>
        <a-tab-pane key="2" tab="一检"></a-tab-pane>
        <a-tab-pane key="3" tab="二检"></a-tab-pane>
        <a-tab-pane key="4" tab="采纳"></a-tab-pane>
        <a-tab-pane key="5" tab="已申请"></a-tab-pane>
        <a-tab-pane key="6" tab="放弃"></a-tab-pane>
      </a-tabs>
      <un-check v-if="tab == 1 || tab == 2 || tab == 3" :type="tab"></un-check>
<!--      <one-check v-if="tab == 2"></one-check>-->
<!--      <two-check v-if="tab == 3"></two-check>-->
      <accept v-if="tab == 4"></accept>
      <register v-if="tab == 5"></register>
      <abandon v-if="tab == 6"></abandon>
    </a-card>
    <a-modal
      title="手动添加已注册商标"
      :width="600"
      v-model="addVisible"
    >
      <a-form-model
        ref="addForm"
        :model="addForm"
        :rules="addRules"
        :label-col="labelCol"
        :wrapper-col="wrapperCol"
      >
        <a-form-model-item label="注册号" prop="reg_no">
          <a-input type="text" placeholder="请输入商标注册号" />
        </a-form-model-item>
        <a-form-model-item label="商标名称" prop="tm_name">
          <a-input type="text" placeholder="请输入商标名称" />
        </a-form-model-item>
        <a-form-model-item label="申请人姓名" prop="tm_name">
          <a-input type="text" placeholder="请输入申请人姓名" />
        </a-form-model-item>
        <a-form-model-item label="申请人身份证" prop="tm_name">
          <a-input type="text" placeholder="请输入申请人身份证" />
        </a-form-model-item>
        <a-form-model-item label="商标类别" prop="category">
          <a-select>
            <a-select-option value="1">1日化用品</a-select-option>
            <a-select-option value="2">2化学用品</a-select-option>
          </a-select>
        </a-form-model-item>
        <a-form-model-item label="当前官方状态" prop="status">
          <a-select>
            <a-select-option value="1">驳回</a-select-option>
            <a-select-option value="2">异议</a-select-option>
            <a-select-option value="3">下证</a-select-option>
          </a-select>
        </a-form-model-item>
        <a-form-model-item label="推荐理由" prop="remark">
          <a-textarea :rows="4" placeholder="输入为什么要推荐注册这个商标"></a-textarea>
        </a-form-model-item>
        <a-form-model-item label="上传申请材料">
          <a-upload
            name="file"
            :multiple="true"
            action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
          >
            <a-button size="small" icon="upload" type="primary">选择文件</a-button>
          </a-upload>
        </a-form-model-item>
      </a-form-model>
    </a-modal>
  </page-header-wrapper>
</template>

<script>
import UnCheck from '@/views/other/components/UnCheck'
// import OneCheck from '@/views/other/components/OneCheck'
// import TwoCheck from '@/views/other/components/TwoCheck'
import Register from '@/views/other/components/Register'
import Accept from '@/views/other/components/Accept'
import Abandon from '@/views/other/components/Abandon'

export default {
  name: 'AllStep',
  components: { Abandon, Accept, Register, UnCheck },
  data () {
    return {
      tab: '1',
      labelCol: { span: 6 },
      wrapperCol: { span: 14 },
      addForm: {},
      addRules: {

      },
      addVisible: false
    }
  },
  methods: {
    onTabs (key) {
      this.tab = 10
      this.tab = key
    },
    addTrademark () {
      this.addVisible = true
    }
  }
}
</script>

<style scoped>

</style>
